import { createSSRApp } from 'vue'
import App from './App.vue'
import { createPinia } from 'pinia'
import { jump } from './utils/router'
import { toast, useArrayReturn } from './utils/uni-app'

import './styles/index.scss'

useArrayReturn()

export function createApp () {
  const app = createSSRApp(App)
  app.use(createPinia())

  app.config.globalProperties.$toast = toast
  app.config.globalProperties.$to = jump
  return {
    app
  }
}
